<ion-view >
<header  class="user-defined-header user-header-style2 bar bar-header">
		<a class="button button-clear icon ion-ios-arrow-left" ng-click="back_from()" ></a>
			<h1 class="title">商品详情</h1>
		<button class="button button-clear icon ion-ios-star bar-right-bt" ng-if="!productInfo.is_followed" ng-click="product_follow()"></button>
		<button class="button button-clear icon ion-ios-star bar-right-bt font-color-xg" ng-if="productInfo.is_followed" ng-click="product_follow_cancel()"></button>
		<button class="button button-clear icon ion-share" ng-click="share()"></button>
</header>

<ion-content class="has-header has-footer bk-gray" data-ng-init="loadProductInfo()">
	<!--<div class="product-info-main-img"><img src="{{productInfo.image}}"/></div>-->
	<div id="store-slide">
      <ion-slide-box does-continue="true" slide-interval="3000" id="main-slide"  auto-play="true" delegate-handle="product_slideimgs">
        <ion-slide ng-repeat="img in productInfo.imglist">
          <div class="box">
            <div class="box-img">
              <img src="{{img}}"/>
            </div>
          </div>
        </ion-slide>
      </ion-slide-box>

	</div>

	<div class="list user-defined-list ">
		<div class="item item-divider font-color-gray">
			<div class="float-left">
				<label class="font-size-sm">认证:</label>
				<span class="identity-icons">
					<span class="identity-icon i1" ng-show="flag1">
						<img src="img/product/i1.png"/>
					</span>
					<span class="identity-icon i2" ng-show="flag2">
						<img src="img/product/i2.png"/>
					</span>
					<span class="identity-icon i3" ng-show="flag3">
						<img src="img/product/i3.png"/>
					</span>
					<span class="identity-icon i4" ng-show="flag4">
						<img src="img/product/i4.png"/>
					</span>
				</span>
			</div>
			<div class="float-right">
				<div class="product-info-title">{{productInfo.name}}</div>
				<div class="product-info-sale font-size-sm">
					<a class="subdued icon ion-ios-heart-outline">人气：{{productInfo.upvote_count}}</a>
					<span id="">
						总销量：{{productInfo.sale_count}}
					</span>
				</div>
			</div>
		</div>
		<div class="item item-divider font-color-gray">
			<div class="float-left">
				<div class="product-info-logo">
					<img src="{{productInfo.shop.logo}}"/>
				</div>

			</div>

			<span class="font-size-md " ng-click="gotoStore(productInfo.shop.id)">{{productInfo.shop.name}}</span>

			<span class="font-size-title float-right font-color-xg">¥{{productInfo.sale_price}}</span>

		</div>
	</div>

	<div class="list user-defined-list margin-top-10" v-if="productInfo.sample" ng-click="sample_exc()">
		<div class="item item-divider font-color-gray">
			<span class="font-size-lg ">茶样兑换50克</span>
			<span class="font-size-md font-color-pink">(剩余{{productInfo.stock}}袋)</span>

			<span class=" float-right">
				<span class="">需</span>
				<span class="font-color-pink">{{productInfo.sample_integral}}积分</span>
				<a href="#" class="subdued icon ion-ios-arrow-right"></a>
			</span>
		</div>
	</div>

	<div class="product-bar-title color-stlye-green margin-top-10">
		茶品介绍
	</div>
	<div class="list user-defined-list ">

		<div class="item item-divider font-color-gray">
			<div class="row font-size-md">
				<div class="col">
					<span class="">时间</span>
					<span class="font-color-green">{{productInfo.ptime}}</span>
				</div>
				<div class="col">
					<span class="padding-5">品类</span>
					<span class="font-color-green">{{productInfo.category.name}}</span>
				</div>
				<div class="col">
					<span class="">净含量</span>
					<span class="font-color-green">{{productInfo.weight}}克</span>
				</div>
			</div>
		</div>
		<div class="item item-divider font-color-gray font-size-md col">
			<span class="">配料</span>
			<span class="font-color-green">{{productInfo.ingredient}}</span>
		</div>
		<div class="item item-divider font-color-gray font-size-md col">
			<span class="">产地</span>
			<span class="font-color-green ">{{productInfo.place}}</span>
		</div>
	</div>

	<div class="myrow bk-white font-color-gray margin-top-10 product-info">

		<!--<p ng-bind-html="productInfo.content" class="img-text-content"></p>-->
		<!--<p class="font-center font-color-xg"> 图片仅提供参考</p>-->

		<ion-gallery ion-gallery-items="info_img_list" ion-gallery-row="1" ion-gallery-toggle="false"></ion-gallery>

	</div>

	<div class="teatalk-item-share bk-white">
		<div class="teatalk-share-bt float-left" ng-click="share()">
			<span>
				<a class="subdued icon ion-share icon-num icon-20"></a>
			</span>
		</div>
		<div class="teatalk-share-bt float-left" ng-click="show_product_comment(productInfo.id)">
			<span>
				<a class="subdued icon ion-ios-chatbubble-outline icon-num icon-20">{{comments_count}}</a>
			</span>
		</div>
		<div class="teatalk-share-bt float-left" ng-click="is_vote(productInfo.is_upvote,productInfo.id)">
			<span>
				<a class="subdued icon ion-ios-heart-outline icon-num icon-20" ng-class="{'font-color-xg':productInfo.is_upvote}">{{productInfo.upvote_count}}</a>
			</span>
		</div>
	</div>

	<div class="list margin-top-10 warp-auto-list">

		<div class="item " ng-repeat="item in comments">
			<div class="product-comment-buyer row-flex">
				<div class="teatalk-store-logo float-left">
					<img src="{{item.user.avatar}}"/>
				</div>
				<div class="float-left">
					<div>
						<span class="teatalk-store-name  font-color-gray"><span class="font-size-normal">{{item.user.nickname}}</span></span>
					</div>
					<div class="teatalk-store-info ">
						<span class="font-size-ss">{{item.time}}</span>
					</div>
					<div class="product-comment font-color-gray font-size-normal">
						{{item.content}}
					</div>
				</div>
			</div>
		</div>
		<div class="text-center bk-white padding-10 font-color-gray" ng-if="comments.length < comments_count" ng-click="load_product_comment()">
			点击加载更多评论
		</div>
	</div>

</ion-content >

<div class="user-defined-footer ">
	<div class="product-buy-storeBt float-left">
		<a class="subdued icon ion-headphone " ng-click="product_goto_chat(productInfo.shop.owner.id)">客服</a>
		<a class="subdued icon ion-home" ng-click="product_goto_store()">店铺</a>
	</div>
	<div class="product-buy-buyBt float-left">
		<div class="buy-bt product-buy-carBt float-left" ng-click="addCart()">
			加入购物车
		</div>
		<div class="buy-bt product-buy-goBt float-left" ng-click="buy()">
			立即购买
		</div>
	</div>
</div>

<script id="my-modal.html" type="text/ng-template">
  <div class="modal" style="background: rgba(0,0,0,0)">
  		<div class="modal-bg" style="width:100%;height:20%;position:absolute;background: rgba(0,0,0,.6)" ng-click="modal.hide()"></div>
  		<div class="modal-content bk-white" style="width:100%;height:80%;bottom:0;position:absolute;">
			<div class="buyInfo">
				<div class="buyInfo-img">
					<img src="{{productInfo.image}}"/>
				</div>
				<div class="buyInfo-price">¥{{productInfo.sale_price}}</div>
				<div class="buyInfo-stock">库存{{productInfo.stock}}件</div>
				<button class="button button-clear icon ion-ios-close-empty buyInfo-close" ng-click="modal.hide()"></button>
			</div>
			<div style="height: 1px;border-top: 1px solid #aaa;margin:5px 15px;"></div>

			<div class="buyInfo-conut">
				<span class="float-left">购买数量</span>
				<count-input ng-model="buyInfo.count" class="float-right"></count-input>
			</div>

  			<div style="height: 1px;border-top: 1px solid #aaa;margin:5px 15px;"></div>

  			<div class="user-defined-footer ">
  				<div class="buyInfo-buyBt" ng-click="goto_orderConfirm()">确定</div>
			</div>
  		</div>
  </div>
</script>

</ion-view>
